package site.fantasycube.blog.common.domain;


import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.util.Date;


/**
 * @author 幻&乐
 * @Date 2021/12/25
 * 描述 公共entry
 */
@Setter
@Getter
@ToString
public class BaseEntity<T> extends Model<BaseEntity<T>> {

    /**
     *描述：主键
     */
    @TableId
    private String id;

    /**
     *描述：修改时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy:MM:dd HH:mm:ss")
    private Date updDate;

    /**
     *描述：添加时间
     */
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy:MM:dd HH:mm:ss")
    private Date addDate;

}
